UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/EHg+SziaK4jw6PZTM/w9GgSvWB+Y2zgm0a+mywRbWk=' 
WHERE 
  key_id = '67bc902074753f0d17bd8f42c4a9ef33c71a5f135023acc87a6fdb74ed768104' 
  AND (
    token = '/EHg+SziaK4jw6PZTM/w9GgSvWB+Y2zgm0a+mywRbWk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039