UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bJQ7duUKAlaYobxlW9lrR6nSmR1NANr1KsW5j1VBu/o='
WHERE
key_id = '35569bf6518b61222f46f7daefed03710367fffc78f63a85032852ecba41132b'
AND (
token = 'bJQ7duUKAlaYobxlW9lrR6nSmR1NANr1KsW5j1VBu/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)