UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wUv+74fm6WkjB7ysc8SbojQP/xMVcRWpXFjCoSt4E2E='
WHERE
key_id = '124e7b37f2fd7efdfd37fd3193e446310f5cc4add538eec49ed20a4f48558072'
AND (
token = 'wUv+74fm6WkjB7ysc8SbojQP/xMVcRWpXFjCoSt4E2E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)