UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0848JwkopJRDSwBHuJwjnMAA4V8NnySMuOMH58Z1YyU='
WHERE
key_id = 'fdbec43274d3058ab2b0ce89d8d90e18682de6f8debeacc45471d5c27719c113'
AND (
token = '0848JwkopJRDSwBHuJwjnMAA4V8NnySMuOMH58Z1YyU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)