UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'gYKH8dE6Bww2ep2XRtr5jC+/pR6RDHHKeytS3b1iojU=' 
WHERE 
  key_id = '523f555a586c9b23aea444d815359d7b7ad17d6b19eb76d9e75b16774e183908' 
  AND (
    token = 'gYKH8dE6Bww2ep2XRtr5jC+/pR6RDHHKeytS3b1iojU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014