UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jUXKuwAmbT1FXbMm1yMeK22YCCBWF0ir06OTc6bU0i8=' 
WHERE 
  key_id = '9c4250d49b287b426d633ccfeaa91bb55c82a818ded20c3e52bc9d669ac488b4' 
  AND (
    token = 'jUXKuwAmbT1FXbMm1yMeK22YCCBWF0ir06OTc6bU0i8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027