UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WkRPE/SHk11jBeksnakEw7XXfx1mX3hxq0Ysf6RfMvs='
WHERE
key_id = '15c34c410c01ed45e7138f9cb10222e7d7fda98d0e7efacc8d7003cd78ae0810'
AND (
token = 'WkRPE/SHk11jBeksnakEw7XXfx1mX3hxq0Ysf6RfMvs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)