UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zWK9wmZSyJRbVAeZeBgyZPfrL0lmhXcYit1LLqnFJcY=' 
WHERE 
  key_id = '28b48a5a64e04d4843d0f46835e30c66b2f61702e4c3b09b218896b4864bb56a' 
  AND (
    token = 'zWK9wmZSyJRbVAeZeBgyZPfrL0lmhXcYit1LLqnFJcY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033