UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qLTcVUaAE0LP2XEi8kjjiGQTJh+HjycQJvcbsK9UKqg='
WHERE
key_id = '4dbbcd2540e2fec9d4fd20ad70eaeb94dab5605ed88856008cf8c7f4a5a9bd0b'
AND (
token = 'qLTcVUaAE0LP2XEi8kjjiGQTJh+HjycQJvcbsK9UKqg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)