UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8rBAHQpfEcYdkVDqLQdcAQsmOYAL5RVTjKMEmr9Kzic=' 
WHERE 
  key_id = '41b6e41e377c9ab0f26ffea8242f271d71a1c2d1ea1c7ba81cd846ffd28e0764' 
  AND (
    token = '8rBAHQpfEcYdkVDqLQdcAQsmOYAL5RVTjKMEmr9Kzic=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029