UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5ewC7mJP3DxSn69wrwct5tBpCp/jZgQntWKstrj+Obc=' 
WHERE 
  key_id = '756087606a3eb1cda907d86ded4bf3d1877384ee21a90a5902d14cfe1d8c8a62' 
  AND (
    token = '5ewC7mJP3DxSn69wrwct5tBpCp/jZgQntWKstrj+Obc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00078