UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T6xmxz4ZHIVJu6o4L+witRdR1zXp7cVKIQuNUaU7OFs='
WHERE
key_id = '1cb33ee8cae5f064e3d223aa9e01a1c2bfefd25cb2edb3784f85a22bd5e59ca2'
AND (
token = 'T6xmxz4ZHIVJu6o4L+witRdR1zXp7cVKIQuNUaU7OFs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)