UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'x7+Sr14MCO3XYNmSnAW2I9+RJmvhhG3LMPUhcKrumTQ='
WHERE
key_id = '6041fc22b0d8618ab3118bc7f7abf9b38cfb88f0a3ed7c11ac38c3236c29e2ba'
AND (
token = 'x7+Sr14MCO3XYNmSnAW2I9+RJmvhhG3LMPUhcKrumTQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)