UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2JvKx+LrEo/36GD2oQGqLtrEu16qBW8hmJLSPWtvG9E=' 
WHERE 
  key_id = '4a7437f3ba744bcea9d57bfe93ce95f9e617afe21cac88fd48f1126e2ba6cafa' 
  AND (
    token = '2JvKx+LrEo/36GD2oQGqLtrEu16qBW8hmJLSPWtvG9E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038