UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Xs24VgvZ/1KEZbrox+oQQfXK6Kbfosssvxj/P49texk='
WHERE
key_id = 'c27ecbc2420a56ab9d1a4d594fef9f7c382a81ca3994c8fefafe02d4ab3841cc'
AND (
token = 'Xs24VgvZ/1KEZbrox+oQQfXK6Kbfosssvxj/P49texk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)