UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KoCukeAWP5TnBRqNFPiXYI4Y/gJJK0+vSEwawlS9X5M='
WHERE
key_id = '8930d7d49c137bb741c221e927834bdb03cd535ecf25b8aa6b2522bae38a6235'
AND (
token = 'KoCukeAWP5TnBRqNFPiXYI4Y/gJJK0+vSEwawlS9X5M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)