UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3P52jaB/YJiGPTRyIRcTRvHTUFqDjA0lZHx8SoZZtOA=' 
WHERE 
  key_id = '708bd705a2f506d3d9e60d24902f433bf0f7a15be5300cfcd45647d2eb27cc60' 
  AND (
    token = '3P52jaB/YJiGPTRyIRcTRvHTUFqDjA0lZHx8SoZZtOA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017