UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bBLeDKiv6xnqxp0yZXiMc3TtfLdeou3QG7sGW/h1s14='
WHERE
key_id = '2d41206bb67b579eccc5c0f1a4ca82dc7e76ae88edd0418e4ebe76fcb3e49560'
AND (
token = 'bBLeDKiv6xnqxp0yZXiMc3TtfLdeou3QG7sGW/h1s14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)