UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q+Si/uXelZsMdHq64Q5uhEZ/qgPRF+ZznMDMQaYR+jc='
WHERE
key_id = 'b1fed4c1067969388a11378ead60edbb190a200964463652b7aec27c416a74c5'
AND (
token = 'Q+Si/uXelZsMdHq64Q5uhEZ/qgPRF+ZznMDMQaYR+jc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)