UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'd5sA/EJiFNr9GVZ37BQNqU2Nr8/Y4vqJJsEAQuYzC2I='
WHERE
key_id = 'bba2596161f0587aaafbdb80affe8516a242ae0a4a3b6bdc7723e9071238674a'
AND (
token = 'd5sA/EJiFNr9GVZ37BQNqU2Nr8/Y4vqJJsEAQuYzC2I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)