UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7G5TQaKJ/MQA9jQYarJuxuSIjHztQK6CJnP+CN8ieho='
WHERE
key_id = '73ee64e8865536b1bbe06808eb2bbdfc6d0da3d13565a00c7b1681e86faa9889'
AND (
token = '7G5TQaKJ/MQA9jQYarJuxuSIjHztQK6CJnP+CN8ieho='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)