UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Ro9OvtV2Oq5Xi9sgCnxOw8MtdPdykl7W2CEFFukE/oY=' 
WHERE 
  key_id = 'd41ae81b47b3bdce083b2e2b3400d6103ec42fdffee2ca3c06fc2502abf2ba11' 
  AND (
    token = 'Ro9OvtV2Oq5Xi9sgCnxOw8MtdPdykl7W2CEFFukE/oY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033