UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FGumUjsKxewpN5PWnytcHnptGA924+jwYt6WW59zpXU='
WHERE
key_id = 'f4692e53bd8ea1d7ccbcb1379395ba19dfad2d1d978f10a75b4d821c0c20cd6f'
AND (
token = 'FGumUjsKxewpN5PWnytcHnptGA924+jwYt6WW59zpXU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)