UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jL/xX3Q259qa45+m/UK6kTj24ZISkMSKkAnnCQFFwt4='
WHERE
key_id = '62d718e1c171d33ecc6eeaa1c8b20c1aa6e83021d82f7a6964acab80c4965e58'
AND (
token = 'jL/xX3Q259qa45+m/UK6kTj24ZISkMSKkAnnCQFFwt4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)