UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '72cigfwmDuAM+/foeCn4l/D/JTOWsXPuQE2yPTbg4+I=' 
WHERE 
  key_id = 'b31f4572d707be920ee9150f3b9ba16c4af6e738952f5421bedc5bab39c1ffd3' 
  AND (
    token = '72cigfwmDuAM+/foeCn4l/D/JTOWsXPuQE2yPTbg4+I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028