UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cLLJ+qqhHyPiOwtMp37R1olD6t8m2cvHPfRz6efb1To=' 
WHERE 
  key_id = '2163cc43a1ecc2cda7fd7e62b5c271fe68ab6fe278bce29f5bc5e24b3c2e7bc1' 
  AND (
    token = 'cLLJ+qqhHyPiOwtMp37R1olD6t8m2cvHPfRz6efb1To=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032