UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qcxZFy69DbfW/Yfy535uYBAtSB4kK4rdvXbEIUZcWnY='
WHERE
key_id = '79564ef5938d8bdfa8aa4e170f0acb041affaa63223e395a983d99d3b5b43029'
AND (
token = 'qcxZFy69DbfW/Yfy535uYBAtSB4kK4rdvXbEIUZcWnY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)