UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '792pL6bSPm1aoBCt9L2w+U9wX9tJK27LeZTnMwiVrN4='
WHERE
key_id = '2f266b327f437cb60a1e53dcea161d5daa5d93c1cc14a6af2ca0467ef0b79a22'
AND (
token = '792pL6bSPm1aoBCt9L2w+U9wX9tJK27LeZTnMwiVrN4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)