UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5EoSlLOgPbVI3c1mz2twqvVau39Uc2WSibYMlkrpo8E='
WHERE
key_id = '3f4c71156928da924f55ed893dfbb39e0b43f0891fff8ff8a0933e408225ce1c'
AND (
token = '5EoSlLOgPbVI3c1mz2twqvVau39Uc2WSibYMlkrpo8E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)