UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u2u7F2+Lk980XKodZAywQQgy0T5un5NcPg4GC7UzcoI='
WHERE
key_id = '77748f4b4c5b9aea75487b43031e842b0ac7d8bbff04886d16f30c9f56aabb11'
AND (
token = 'u2u7F2+Lk980XKodZAywQQgy0T5un5NcPg4GC7UzcoI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)