UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3/3bD1bn4TO6r1EoaNqzSDy/9ZJEo3VKrGMry2/SJ0k='
WHERE
key_id = '9967c4bde3501472a9fe886c100afd6a4255bbfa15d4ea3e25f8c2a86a24a9ab'
AND (
token = '3/3bD1bn4TO6r1EoaNqzSDy/9ZJEo3VKrGMry2/SJ0k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)