UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yrmHqheMyixUP1j9NClV3zD9ZrDEmyYq5cX4DHJ2NQo='
WHERE
key_id = '4559b0e46d0c9ec0fa895f18350838f5b702cec9c0581a6a191bd2398c0befba'
AND (
token = 'yrmHqheMyixUP1j9NClV3zD9ZrDEmyYq5cX4DHJ2NQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)