UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LQasIQxGNoGWLIJblGkkyGvT4Fh+kV//VL1eCYiTPZU='
WHERE
key_id = '254bee8410e76d1711cb9008d399efee07b81ce42ba7fd7375f8abbcdee0dfb1'
AND (
token = 'LQasIQxGNoGWLIJblGkkyGvT4Fh+kV//VL1eCYiTPZU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)