UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rxqTotq80INu2NKplxpe9VTzvNDU/9jZQcR2Iu34bBs='
WHERE
key_id = '456816a8947b50f0a55614e66466d15c50f129796005b1df182d9d2a1eddde83'
AND (
token = 'rxqTotq80INu2NKplxpe9VTzvNDU/9jZQcR2Iu34bBs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)