UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3Cl0t9XpSQXhKfd3UaT2pF41YoI104KsyhyjzFKWoUI=' 
WHERE 
  key_id = 'd2e72984aca7a60934bd589833bcf2cdfe0cc78db74fbdb92e7810426ef6e330' 
  AND (
    token = '3Cl0t9XpSQXhKfd3UaT2pF41YoI104KsyhyjzFKWoUI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034