UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'd+gEKndeX2H6lwOW32kcj/L8NZcX5B62OLhAwr2cnxk='
WHERE
key_id = '6cbec56b92f59331159c932bb0d3a093350b674e7f08fa732ee504453334782f'
AND (
token = 'd+gEKndeX2H6lwOW32kcj/L8NZcX5B62OLhAwr2cnxk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)