UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TuUV307ZOL3COdL+TPdeRnehGzrSzXzlRUNT2mOkQ9g='
WHERE
key_id = '552705ce6bb263c98099818434d38af538895b5e7c591306b69def12ff6b82c3'
AND (
token = 'TuUV307ZOL3COdL+TPdeRnehGzrSzXzlRUNT2mOkQ9g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)