UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BZ7bSv7n2JzClhLAvlWN/5DZ80gmb/NymA+OsHiLbm0='
WHERE
key_id = '1f80da8ea19c95e8dec23cbaf0367655af8feda4e60f1a1c15ddf5ac936a2f6d'
AND (
token = 'BZ7bSv7n2JzClhLAvlWN/5DZ80gmb/NymA+OsHiLbm0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)