UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'apSE/GQYbjai5qU9v/PEd1+mLBpQHk8qFu0ae9NXA5E='
WHERE
key_id = '6144a520af845a4dcc6dbedfcda51b74cc608e2a3b57d0bf98cf9fd2bef284f9'
AND (
token = 'apSE/GQYbjai5qU9v/PEd1+mLBpQHk8qFu0ae9NXA5E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)