UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '82rZATevSOkWG/z6+MBqSuZar6rI29wCOzBxnQbf4RQ='
WHERE
key_id = '48fe81baefaf024831a1de86828fe3f99c0db8d7eb00633c67ee4604bf1d7b34'
AND (
token = '82rZATevSOkWG/z6+MBqSuZar6rI29wCOzBxnQbf4RQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)